let app = getApp()
Component({
    properties: {
 
      },
      data:{
      
      },
    lifetimes: {
        attached: function () {
          var that=this
          wx.request({
            url: app.globalData.siteroot,
            data: {
              do:'Distribution_getDistributionSetting',
              staff_id:wx.getStorageSync('staff_bind_id')
            },
            success: function(res) {
               var n = [];
               if(res.data.data.withdraw_type.indexOf("wechat")){
                n.push("微信")
               }
               if(res.data.data.withdraw_type.indexOf("alipay")){
                n.push("支付宝")
               }
               if(res.data.data.withdraw_type.indexOf("bank_card")){
                n.push("银行卡")
               }
               var agreeDetail=res.data.data
               agreeDetail.withdraw_type=n
                that.setData({
                  agreeDetail:agreeDetail
                })
            }
          })
       }
      },
    methods: {
    }
});
